﻿using System;
using System.Collections.Generic;
using System.Text;
using HexUtilHelpV2;

namespace HexUtilHelpV2Test
{
    class Program
    {
        static void Main(string[] args)
        {
            try
            {
                Console.WriteLine("HexUtilHelpV2 Test");
                Console.WriteLine(string.Format("PercentToHex ==>{0}", HexToolV2.PercentToHex(80, 4)));//00CC
                Console.WriteLine(string.Format("HexToDecimal ==>{0}", HexToolV2.ConvertToDecimal("cc")));//204
                Console.WriteLine(string.Format("DecimalToHex ==>{0}", HexToolV2.ToHexString(12, 2)));//0C
                Console.WriteLine(string.Format("HexToDecimal ==>{0}", HexToolV2.ConvertToDecimal("0C")));//12
                Console.WriteLine(string.Format("HexToInt ==>{0}", HexToolV2.ConvertToInt("0C")));//12
                Console.WriteLine(string.Format("IntToHex ==>{0}", HexToolV2.ToHexString(120, 2)));//0C
            }
            catch (Exception ex)
            {
                Console.WriteLine(ex.Message.Trim());
            }
            finally
            {
                Console.ReadLine();
            }
        }
    }
}
